const app = getApp();

// 没有export deafult的文件，前面引用要加大括号
export function cutprice_base_info() 
{
	return new Promise((resolve, reject) => {
		const value = uni.getStorageSync('cutprice_lang_info');
		if (value) {
			resolve(value);
		}else{
			// 加载loding
			uni.request({
			    url: app.globalData.get_request_url('base', 'index', 'cutprice'),
			    method: 'POST',
			    data: {},
			    dataType: 'json',
			    success: (res) => {console.log(res);
			        if (res.data.code == 0) {
			            var data = res.data.data;
						uni.setStorageSync('cutprice_lang_info', data);
						resolve(data);
			        }else{
						reject(res.data.msg);
					}
			    }
			});
		}
	});
}